<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>前端实现详情页&#39;上一个/下一个&#39;功能 | LV&#39;s Blog</title>
    <meta name="generator" content="VuePress 1.5.3">
    <link rel="icon" href="$withBase(&#39;/icons/favicon.ico&#39;)">
    <link rel="manifest" href="/manifest.json">
    <link rel="apple-touch-icon" href="/icons/apple-touch-icon.png">
    <link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#3eaf7c">
    <meta name="description" content="The best time to plant a tree is ten years ago, followed by now.">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <meta name="theme-color" content="#3eaf7c">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="preload" href="/assets/css/0.styles.82d81337.css" as="style"><link rel="preload" href="/assets/js/app.7b81b1ac.js" as="script"><link rel="preload" href="/assets/js/4.86a5c9af.js" as="script"><link rel="preload" href="/assets/js/1.9c3b3d13.js" as="script"><link rel="preload" href="/assets/js/23.08e890b8.js" as="script"><link rel="preload" href="/assets/js/10.565245e4.js" as="script"><link rel="prefetch" href="/assets/js/11.c39d5e8c.js"><link rel="prefetch" href="/assets/js/12.30351ec2.js"><link rel="prefetch" href="/assets/js/13.d42d4568.js"><link rel="prefetch" href="/assets/js/14.2652aecf.js"><link rel="prefetch" href="/assets/js/15.e52954b2.js"><link rel="prefetch" href="/assets/js/16.fef3efd8.js"><link rel="prefetch" href="/assets/js/17.d625d0fb.js"><link rel="prefetch" href="/assets/js/18.09c5e1ac.js"><link rel="prefetch" href="/assets/js/19.6332ddb9.js"><link rel="prefetch" href="/assets/js/20.a6e84d47.js"><link rel="prefetch" href="/assets/js/21.8447b7cb.js"><link rel="prefetch" href="/assets/js/22.6b085312.js"><link rel="prefetch" href="/assets/js/24.7b52ad11.js"><link rel="prefetch" href="/assets/js/25.850805a0.js"><link rel="prefetch" href="/assets/js/26.1d409dfa.js"><link rel="prefetch" href="/assets/js/27.9701193f.js"><link rel="prefetch" href="/assets/js/28.de901c6f.js"><link rel="prefetch" href="/assets/js/29.c2369767.js"><link rel="prefetch" href="/assets/js/3.6b19f7fa.js"><link rel="prefetch" href="/assets/js/5.abd33a09.js"><link rel="prefetch" href="/assets/js/6.05b2d96b.js"><link rel="prefetch" href="/assets/js/7.7d786be8.js"><link rel="prefetch" href="/assets/js/8.8cc12a63.js"><link rel="prefetch" href="/assets/js/9.835791cc.js">
    <link rel="stylesheet" href="/assets/css/0.styles.82d81337.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar" data-v-dad8a512><div data-v-dad8a512><div id="loader-wrapper" class="loading-wrapper" data-v-d48f4d20 data-v-dad8a512 data-v-dad8a512><div class="loader-main" data-v-d48f4d20><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div></div> <!----> <!----></div> <div class="password-shadow password-wrapper-out" style="display:none;" data-v-64685f0e data-v-dad8a512 data-v-dad8a512><h3 class="title" style="display:none;" data-v-64685f0e data-v-64685f0e>LV's Blog</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-64685f0e data-v-64685f0e><input type="password" value="" data-v-64685f0e> <span data-v-64685f0e>Konck! Knock!</span> <button data-v-64685f0e>OK</button></label> <div class="footer" style="display:none;" data-v-64685f0e data-v-64685f0e><span data-v-64685f0e><i class="iconfont reco-theme" data-v-64685f0e></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-64685f0e>vuePress-theme-reco</a></span> <span data-v-64685f0e><i class="iconfont reco-copyright" data-v-64685f0e></i> <a data-v-64685f0e><span data-v-64685f0e>lv_song</span>
            
          <!---->
          2020
        </a></span></div></div> <div class="hide" data-v-dad8a512><header class="navbar" data-v-dad8a512><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/icons/favicon.ico" alt="LV's Blog" class="logo"> <span class="site-name">LV's Blog</span></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/chat/" class="nav-link"><i class="iconfont undefined"></i>
  chat
</a></li><li class="dropdown-item"><!----> <a href="/categories/frontEnd/" class="nav-link"><i class="iconfont undefined"></i>
  frontEnd
</a></li></ul></div></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间轴
</a></div><div class="nav-item"><a href="/features/message_board.html" class="nav-link"><i class="iconfont reco-suggestion"></i>
  留言板
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-account"></i>
      联系方式
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://github.com/lvsong77" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-github"></i>
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://www.zhihu.com/people/lu-wu-shang" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-zhihu"></i>
  知乎
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-dad8a512></div> <aside class="sidebar" data-v-dad8a512><div class="personal-info-wrapper" data-v-ca798c94 data-v-dad8a512><img src="/avatar.jpg" alt="author-avatar" class="personal-img" data-v-ca798c94> <h3 class="name" data-v-ca798c94>
    lv_song
  </h3> <div class="num" data-v-ca798c94><div data-v-ca798c94><h3 data-v-ca798c94>8</h3> <h6 data-v-ca798c94>文章</h6></div> <div data-v-ca798c94><h3 data-v-ca798c94>10</h3> <h6 data-v-ca798c94>标签</h6></div></div> <hr data-v-ca798c94></div> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/chat/" class="nav-link"><i class="iconfont undefined"></i>
  chat
</a></li><li class="dropdown-item"><!----> <a href="/categories/frontEnd/" class="nav-link"><i class="iconfont undefined"></i>
  frontEnd
</a></li></ul></div></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间轴
</a></div><div class="nav-item"><a href="/features/message_board.html" class="nav-link"><i class="iconfont reco-suggestion"></i>
  留言板
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-account"></i>
      联系方式
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://github.com/lvsong77" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-github"></i>
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://www.zhihu.com/people/lu-wu-shang" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-zhihu"></i>
  知乎
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <!----> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-64685f0e data-v-dad8a512><h3 class="title" style="display:none;" data-v-64685f0e data-v-64685f0e>前端实现详情页'上一个/下一个'功能</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-64685f0e data-v-64685f0e><input type="password" value="" data-v-64685f0e> <span data-v-64685f0e>Konck! Knock!</span> <button data-v-64685f0e>OK</button></label> <div class="footer" style="display:none;" data-v-64685f0e data-v-64685f0e><span data-v-64685f0e><i class="iconfont reco-theme" data-v-64685f0e></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-64685f0e>vuePress-theme-reco</a></span> <span data-v-64685f0e><i class="iconfont reco-copyright" data-v-64685f0e></i> <a data-v-64685f0e><span data-v-64685f0e>lv_song</span>
            
          <!---->
          2020
        </a></span></div></div> <div data-v-dad8a512><main class="page"><div class="page-title" style="display:none;"><h1>前端实现详情页'上一个/下一个'功能</h1> <div data-v-3b7f5bdf><i class="iconfont reco-account" data-v-3b7f5bdf><span data-v-3b7f5bdf>lv_song</span></i> <i class="iconfont reco-date" data-v-3b7f5bdf><span data-v-3b7f5bdf>2020-08-27</span></i> <i class="iconfont reco-eye" data-v-3b7f5bdf><span id="/post/frontend/200827_-shang-yi-ge_-xia-yi-ge-qian-duan-kong-zhi.html" data-flag-title="Your Article Title" class="leancloud-visitors" data-v-3b7f5bdf><a class="leancloud-visitors-count" style="font-size:.9rem;font-weight:normal;color:#999;"></a></span></i> <i class="iconfont reco-tag tags" data-v-3b7f5bdf><span class="tag-item" data-v-3b7f5bdf>original</span><span class="tag-item" data-v-3b7f5bdf>Vue</span></i></div></div> <div class="theme-reco-content content__default" style="display:none;"><h2 id="上一个-下一个"><a href="#上一个-下一个" class="header-anchor">#</a> '上一个/下一个'</h2> <p>业务中，我们可能会有一个列表页面，点进其中某一项的详情，会跳到这一项的详情页，<br>
在查看之后，我们可能不希望跳回列表页面，而是直接查看'上一个'或者'下一个'详情，这里就需要有这个功能。</p> <h2 id="为什么要前端实现？"><a href="#为什么要前端实现？" class="header-anchor">#</a> 为什么要前端实现？</h2> <p>往往我们希望后端给我们一个接口，传入详情页的id，已获取'上一个/下一个'的id，或者所有信息，进行显示；<br>
但是，有时候列表会有各种查询条件，条件一多了，或者数据复杂度提升了，或者业务上各种各样的问题，后端的'上一个/下一个'获取到的数据并不一定那么准确；<br>
这时，我们可以通过前端来实现这个功能。我们只需要已有的获取列表和获取详情的函数。</p> <div class="custom-block tip"><p class="custom-block-title">Tip：</p> <p>以下函数参数较多，初次使用稍显复杂，但是只要传参正确，则能很好的解决这个需求。</p></div> <h2 id="实现代码"><a href="#实现代码" class="header-anchor">#</a> 实现代码</h2> <div class="language-js line-numbers-mode"><pre class="language-js"><code><span class="token comment">/**
 * 获取上一个/下一个详情
 * @param {Boolean} isForward true：查找下一项 | false：查找上一项
 * @param {String} storageNamePrefix sessionStorage字段前缀
 * @param {Object} filterOptions 列表数据筛选条件（不筛选传{}）
 * @param {Function} getListFunc 获取列表数据的函数名
 * @param {Function} getDetailFunc 获取详情数据的函数名
 * @param {String} uniqueName 唯一标识的字段名（eg: id)
 * @param {Number} currentId 当前唯一标识id（即详情页初始id）
 * @param {String} listName 储存列表的字段名（eg: list）
 * @param {String} pageTotalName 表示数据总页数的字段名（eg: pages）
 * @param {Function} reachLastFunc 到最后一项时执行的函数
 */</span>
<span class="token keyword">export</span> <span class="token keyword">function</span> <span class="token function">getNextItem</span><span class="token punctuation">(</span>
  <span class="token parameter">isForward<span class="token punctuation">,</span>
  storageNamePrefix<span class="token punctuation">,</span>
  filterOptions<span class="token punctuation">,</span>
  getListFunc<span class="token punctuation">,</span>
  getDetailFunc<span class="token punctuation">,</span>
  uniqueName<span class="token punctuation">,</span>
  currentId<span class="token punctuation">,</span>
  listName<span class="token punctuation">,</span>
  pageTotalName<span class="token punctuation">,</span>
  reachLastFunc</span>
<span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token comment">// 初始化储存数据的对象</span>
  <span class="token keyword">let</span> queryResult <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
    listCollection <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
  <span class="token comment">// 根据filterOption自动创建storageName</span>
  <span class="token keyword">let</span> storageName <span class="token operator">=</span> storageNamePrefix<span class="token punctuation">;</span>
  <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">const</span> key <span class="token keyword">of</span> Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>filterOptions<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    storageName <span class="token operator">+=</span> key <span class="token operator">+</span> filterOptions<span class="token punctuation">[</span>key<span class="token punctuation">]</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
  <span class="token comment">// 判断是否已有sessionStorage数据</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>sessionStorage<span class="token punctuation">[</span>storageName<span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    queryResult <span class="token operator">=</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">parse</span><span class="token punctuation">(</span>sessionStorage<span class="token punctuation">[</span>storageName<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    listCollection <span class="token operator">=</span> queryResult<span class="token punctuation">.</span>listCollection<span class="token punctuation">;</span>
    <span class="token comment">// 判断当前数据中是否有目前的这条数据</span>
    <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">ifContainsCurrent</span><span class="token punctuation">(</span>listCollection<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token comment">// 处理数据</span>
      <span class="token function">handleData</span><span class="token punctuation">(</span>queryResult<span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
      <span class="token comment">// 获取列表数据</span>
      <span class="token function">getListData</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
    <span class="token function">getListData</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

  <span class="token comment">// 判断当前数据中是否有目前的这条数据</span>
  <span class="token keyword">function</span> <span class="token function">ifContainsCurrent</span><span class="token punctuation">(</span><span class="token parameter">listCollection</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">const</span> page <span class="token keyword">of</span> Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>listCollection<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token keyword">if</span> <span class="token punctuation">(</span>
        listCollection<span class="token punctuation">[</span>page<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token function">find</span><span class="token punctuation">(</span><span class="token parameter">item</span> <span class="token operator">=&gt;</span> item<span class="token punctuation">[</span>uniqueName<span class="token punctuation">]</span> <span class="token operator">==</span> currentId<span class="token punctuation">)</span> <span class="token operator">!==</span>
        <span class="token keyword">undefined</span>
      <span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
    <span class="token keyword">return</span> <span class="token boolean">false</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

  <span class="token comment">// 获取列表数据</span>
  <span class="token keyword">function</span> <span class="token function">getListData</span><span class="token punctuation">(</span><span class="token parameter">page<span class="token punctuation">,</span> listCollection</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token function">getListFunc</span><span class="token punctuation">(</span>page<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">res</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
      <span class="token comment">// 获取当前page的list</span>
      <span class="token keyword">let</span> list <span class="token operator">=</span> res<span class="token punctuation">[</span>listName<span class="token punctuation">]</span><span class="token punctuation">;</span>

      listCollection<span class="token punctuation">[</span>page<span class="token punctuation">]</span> <span class="token operator">=</span> list<span class="token punctuation">;</span>
      queryResult <span class="token operator">=</span> <span class="token punctuation">{</span>
        <span class="token operator">...</span>res<span class="token punctuation">,</span>
        listCollection
      <span class="token punctuation">}</span><span class="token punctuation">;</span>
      <span class="token comment">// 判断当前id数据是否已包含在listCollection中</span>
      <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">ifContainsCurrent</span><span class="token punctuation">(</span>listCollection<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token comment">// 处理数据</span>
        <span class="token function">handleData</span><span class="token punctuation">(</span>queryResult<span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
      <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
        <span class="token comment">// 获取下一没有数据的页码</span>
        <span class="token keyword">let</span> nextPage <span class="token operator">=</span> <span class="token function">getNextPageNum</span><span class="token punctuation">(</span>page<span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">// 再次获取列表</span>
        <span class="token function">getListData</span><span class="token punctuation">(</span>nextPage<span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

  <span class="token comment">// 获取下一没有数据的页码</span>
  <span class="token keyword">function</span> <span class="token function">getNextPageNum</span><span class="token punctuation">(</span><span class="token parameter">currentPage<span class="token punctuation">,</span> listCollection</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">let</span> nextPage <span class="token operator">=</span> currentPage <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">;</span>
    <span class="token comment">// 判断下一个页面是否在listCollection的key中</span>
    <span class="token keyword">if</span> <span class="token punctuation">(</span>Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>listCollection<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">indexOf</span><span class="token punctuation">(</span><span class="token function">String</span><span class="token punctuation">(</span>nextPage<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token comment">// 存在</span>
      <span class="token keyword">return</span> <span class="token function">getNextPageNum</span><span class="token punctuation">(</span>nextPage<span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
      <span class="token comment">// 不存在</span>
      <span class="token keyword">return</span> nextPage<span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>

  <span class="token comment">// 处理数据</span>
  <span class="token keyword">function</span> <span class="token function">handleData</span><span class="token punctuation">(</span><span class="token parameter">queryResult<span class="token punctuation">,</span> listCollection</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token comment">// 将数据储存至sessionStorage</span>
    sessionStorage<span class="token punctuation">[</span>storageName<span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span>queryResult<span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token comment">// 遍历listCollection，查找当前的page和index</span>
    <span class="token keyword">let</span> currentPage<span class="token punctuation">,</span> currentIndex<span class="token punctuation">;</span>
    <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">const</span> page <span class="token keyword">of</span> Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>listCollection<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token keyword">let</span> index <span class="token operator">=</span> listCollection<span class="token punctuation">[</span>page<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token function">findIndex</span><span class="token punctuation">(</span>
        <span class="token parameter">item</span> <span class="token operator">=&gt;</span> item<span class="token punctuation">[</span>uniqueName<span class="token punctuation">]</span> <span class="token operator">==</span> currentId
      <span class="token punctuation">)</span><span class="token punctuation">;</span>
      <span class="token keyword">if</span> <span class="token punctuation">(</span>index <span class="token operator">!==</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        currentPage <span class="token operator">=</span> page<span class="token punctuation">;</span>
        currentIndex <span class="token operator">=</span> index<span class="token punctuation">;</span>
        <span class="token keyword">break</span><span class="token punctuation">;</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
    <span class="token comment">// 查找下一个id</span>
    <span class="token keyword">let</span> nextIndex<span class="token punctuation">,</span> nextId<span class="token punctuation">;</span>

    <span class="token keyword">if</span> <span class="token punctuation">(</span>isForward<span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token comment">// 判断当前index是否为当前页最后一项</span>
      <span class="token keyword">if</span> <span class="token punctuation">(</span>currentIndex <span class="token operator">&lt;</span> listCollection<span class="token punctuation">[</span>currentPage<span class="token punctuation">]</span><span class="token punctuation">.</span>length <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token comment">// 不是</span>
        nextIndex <span class="token operator">=</span> currentIndex <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">;</span>
        nextId <span class="token operator">=</span> listCollection<span class="token punctuation">[</span>currentPage<span class="token punctuation">]</span><span class="token punctuation">[</span>nextIndex<span class="token punctuation">]</span><span class="token punctuation">[</span>uniqueName<span class="token punctuation">]</span><span class="token punctuation">;</span>
        <span class="token function">handleIdChange</span><span class="token punctuation">(</span>nextId<span class="token punctuation">)</span><span class="token punctuation">;</span>
      <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
        <span class="token comment">// 是最后一项</span>
        <span class="token comment">// 判断是否为当前listCollection最后一页</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>
          Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>listCollection<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">indexOf</span><span class="token punctuation">(</span>currentPage<span class="token punctuation">)</span> <span class="token operator">===</span>
          Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>listCollection<span class="token punctuation">)</span><span class="token punctuation">.</span>length <span class="token operator">-</span> <span class="token number">1</span>
        <span class="token punctuation">)</span> <span class="token punctuation">{</span>
          <span class="token comment">// 是当前listCollection最后一页</span>
          <span class="token comment">// 判断是否为总数据最后一页</span>
          <span class="token keyword">if</span> <span class="token punctuation">(</span>
            queryResult<span class="token punctuation">[</span>pageTotalName<span class="token punctuation">]</span> <span class="token operator">==</span> Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>listCollection<span class="token punctuation">)</span><span class="token punctuation">.</span>length
          <span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token comment">// 是</span>
            <span class="token function">reachLastFunc</span><span class="token punctuation">(</span>isForward<span class="token punctuation">)</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
            <span class="token comment">// 不是</span>
            <span class="token keyword">let</span> nextPage <span class="token operator">=</span> <span class="token function">Number</span><span class="token punctuation">(</span>currentPage<span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">;</span>
            <span class="token function">getListData</span><span class="token punctuation">(</span>nextPage<span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
          <span class="token comment">// 不是最后一页</span>
          <span class="token keyword">let</span> nextPage <span class="token operator">=</span> <span class="token function">Number</span><span class="token punctuation">(</span>currentPage<span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">;</span>
          <span class="token comment">// 判断下一页是否已获取</span>
          <span class="token keyword">if</span> <span class="token punctuation">(</span>listCollection<span class="token punctuation">[</span>nextPage<span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token comment">// 已获取</span>
            nextId <span class="token operator">=</span> listCollection<span class="token punctuation">[</span>nextPage<span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">[</span>uniqueName<span class="token punctuation">]</span><span class="token punctuation">;</span>
            <span class="token function">handleIdChange</span><span class="token punctuation">(</span>nextId<span class="token punctuation">)</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
            <span class="token comment">// 未获取</span>
            <span class="token function">getNextListData</span><span class="token punctuation">(</span>nextPage<span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
      <span class="token comment">// 判断当前index是否为当前页第一项</span>
      <span class="token keyword">if</span> <span class="token punctuation">(</span>currentIndex <span class="token operator">!=</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token comment">// 不是</span>
        nextIndex <span class="token operator">=</span> currentIndex <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span>
        nextId <span class="token operator">=</span> listCollection<span class="token punctuation">[</span>currentPage<span class="token punctuation">]</span><span class="token punctuation">[</span>nextIndex<span class="token punctuation">]</span><span class="token punctuation">[</span>uniqueName<span class="token punctuation">]</span><span class="token punctuation">;</span>
        <span class="token function">handleIdChange</span><span class="token punctuation">(</span>nextId<span class="token punctuation">)</span><span class="token punctuation">;</span>
      <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
        <span class="token comment">// 是第一项</span>
        <span class="token comment">// 判断是否为当前listCollection第一页</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>Object<span class="token punctuation">.</span><span class="token function">keys</span><span class="token punctuation">(</span>listCollection<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">indexOf</span><span class="token punctuation">(</span>currentPage<span class="token punctuation">)</span> <span class="token operator">===</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
          <span class="token comment">// 是当前listCollection第一页</span>
          <span class="token comment">// 判断是否为总数据第一页</span>
          <span class="token keyword">if</span> <span class="token punctuation">(</span>currentPage <span class="token operator">==</span> <span class="token number">1</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token comment">// 是</span>
            <span class="token function">reachLastFunc</span><span class="token punctuation">(</span>isForward<span class="token punctuation">)</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
            <span class="token comment">// 不是</span>
            <span class="token keyword">let</span> nextPage <span class="token operator">=</span> <span class="token function">Number</span><span class="token punctuation">(</span>currentPage<span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span>
            <span class="token function">getListData</span><span class="token punctuation">(</span>nextPage<span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
          <span class="token comment">// 不是最后一页</span>
          <span class="token keyword">let</span> nextPage <span class="token operator">=</span> <span class="token function">Number</span><span class="token punctuation">(</span>currentPage<span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span>
          <span class="token comment">// 判断上一页是否已获取</span>
          <span class="token keyword">if</span> <span class="token punctuation">(</span>listCollection<span class="token punctuation">[</span>nextPage<span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token comment">// 已获取</span>
            <span class="token keyword">let</span> pageSize <span class="token operator">=</span> listCollection<span class="token punctuation">[</span>nextPage<span class="token punctuation">]</span><span class="token punctuation">.</span>length<span class="token punctuation">;</span>
            nextId <span class="token operator">=</span> listCollection<span class="token punctuation">[</span>nextPage<span class="token punctuation">]</span><span class="token punctuation">[</span>pageSize <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">[</span>uniqueName<span class="token punctuation">]</span><span class="token punctuation">;</span>
            <span class="token function">handleIdChange</span><span class="token punctuation">(</span>nextId<span class="token punctuation">)</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
            <span class="token comment">// 未获取</span>
            <span class="token function">getPreListData</span><span class="token punctuation">(</span>nextPage<span class="token punctuation">,</span> listCollection<span class="token punctuation">)</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>

  <span class="token comment">/**
   * 获取下一页数据的第一个id
   */</span>
  <span class="token keyword">function</span> <span class="token function">getNextListData</span><span class="token punctuation">(</span><span class="token parameter">page<span class="token punctuation">,</span> listCollection</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token function">getListFunc</span><span class="token punctuation">(</span>page<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">res</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
      <span class="token keyword">let</span> list <span class="token operator">=</span> res<span class="token punctuation">[</span>listName<span class="token punctuation">]</span><span class="token punctuation">;</span>
      listCollection<span class="token punctuation">[</span>page<span class="token punctuation">]</span> <span class="token operator">=</span> list<span class="token punctuation">;</span>

      queryResult <span class="token operator">=</span> <span class="token punctuation">{</span>
        <span class="token operator">...</span>res<span class="token punctuation">,</span>
        listCollection
      <span class="token punctuation">}</span><span class="token punctuation">;</span>

      sessionStorage<span class="token punctuation">[</span>storageName<span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span>queryResult<span class="token punctuation">)</span><span class="token punctuation">;</span>

      <span class="token keyword">let</span> nextId <span class="token operator">=</span> list<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">[</span>uniqueName<span class="token punctuation">]</span><span class="token punctuation">;</span>
      <span class="token function">handleIdChange</span><span class="token punctuation">(</span>nextId<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

  <span class="token comment">// 获取上一页数据最后一个id</span>
  <span class="token keyword">function</span> <span class="token function">getPreListData</span><span class="token punctuation">(</span><span class="token parameter">page<span class="token punctuation">,</span> listCollection</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token function">getListFunc</span><span class="token punctuation">(</span>page<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">res</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
      <span class="token keyword">let</span> list <span class="token operator">=</span> res<span class="token punctuation">[</span>listName<span class="token punctuation">]</span><span class="token punctuation">;</span>
      listCollection<span class="token punctuation">[</span>page<span class="token punctuation">]</span> <span class="token operator">=</span> list<span class="token punctuation">;</span>

      queryResult <span class="token operator">=</span> <span class="token punctuation">{</span>
        <span class="token operator">...</span>res<span class="token punctuation">,</span>
        listCollection
      <span class="token punctuation">}</span><span class="token punctuation">;</span>

      sessionStorage<span class="token punctuation">[</span>storageName<span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span>queryResult<span class="token punctuation">)</span><span class="token punctuation">;</span>

      <span class="token keyword">let</span> pageSize <span class="token operator">=</span> list<span class="token punctuation">.</span>length<span class="token punctuation">;</span>
      <span class="token keyword">let</span> nextId <span class="token operator">=</span> list<span class="token punctuation">[</span>pageSize <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">[</span>uniqueName<span class="token punctuation">]</span><span class="token punctuation">;</span>
      <span class="token function">handleIdChange</span><span class="token punctuation">(</span>nextId<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

  <span class="token comment">// 处理id改变事件</span>
  <span class="token keyword">function</span> <span class="token function">handleIdChange</span><span class="token punctuation">(</span><span class="token parameter">nextId</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token function">getDetailFunc</span><span class="token punctuation">(</span>nextId<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br><span class="line-number">78</span><br><span class="line-number">79</span><br><span class="line-number">80</span><br><span class="line-number">81</span><br><span class="line-number">82</span><br><span class="line-number">83</span><br><span class="line-number">84</span><br><span class="line-number">85</span><br><span class="line-number">86</span><br><span class="line-number">87</span><br><span class="line-number">88</span><br><span class="line-number">89</span><br><span class="line-number">90</span><br><span class="line-number">91</span><br><span class="line-number">92</span><br><span class="line-number">93</span><br><span class="line-number">94</span><br><span class="line-number">95</span><br><span class="line-number">96</span><br><span class="line-number">97</span><br><span class="line-number">98</span><br><span class="line-number">99</span><br><span class="line-number">100</span><br><span class="line-number">101</span><br><span class="line-number">102</span><br><span class="line-number">103</span><br><span class="line-number">104</span><br><span class="line-number">105</span><br><span class="line-number">106</span><br><span class="line-number">107</span><br><span class="line-number">108</span><br><span class="line-number">109</span><br><span class="line-number">110</span><br><span class="line-number">111</span><br><span class="line-number">112</span><br><span class="line-number">113</span><br><span class="line-number">114</span><br><span class="line-number">115</span><br><span class="line-number">116</span><br><span class="line-number">117</span><br><span class="line-number">118</span><br><span class="line-number">119</span><br><span class="line-number">120</span><br><span class="line-number">121</span><br><span class="line-number">122</span><br><span class="line-number">123</span><br><span class="line-number">124</span><br><span class="line-number">125</span><br><span class="line-number">126</span><br><span class="line-number">127</span><br><span class="line-number">128</span><br><span class="line-number">129</span><br><span class="line-number">130</span><br><span class="line-number">131</span><br><span class="line-number">132</span><br><span class="line-number">133</span><br><span class="line-number">134</span><br><span class="line-number">135</span><br><span class="line-number">136</span><br><span class="line-number">137</span><br><span class="line-number">138</span><br><span class="line-number">139</span><br><span class="line-number">140</span><br><span class="line-number">141</span><br><span class="line-number">142</span><br><span class="line-number">143</span><br><span class="line-number">144</span><br><span class="line-number">145</span><br><span class="line-number">146</span><br><span class="line-number">147</span><br><span class="line-number">148</span><br><span class="line-number">149</span><br><span class="line-number">150</span><br><span class="line-number">151</span><br><span class="line-number">152</span><br><span class="line-number">153</span><br><span class="line-number">154</span><br><span class="line-number">155</span><br><span class="line-number">156</span><br><span class="line-number">157</span><br><span class="line-number">158</span><br><span class="line-number">159</span><br><span class="line-number">160</span><br><span class="line-number">161</span><br><span class="line-number">162</span><br><span class="line-number">163</span><br><span class="line-number">164</span><br><span class="line-number">165</span><br><span class="line-number">166</span><br><span class="line-number">167</span><br><span class="line-number">168</span><br><span class="line-number">169</span><br><span class="line-number">170</span><br><span class="line-number">171</span><br><span class="line-number">172</span><br><span class="line-number">173</span><br><span class="line-number">174</span><br><span class="line-number">175</span><br><span class="line-number">176</span><br><span class="line-number">177</span><br><span class="line-number">178</span><br><span class="line-number">179</span><br><span class="line-number">180</span><br><span class="line-number">181</span><br><span class="line-number">182</span><br><span class="line-number">183</span><br><span class="line-number">184</span><br><span class="line-number">185</span><br><span class="line-number">186</span><br><span class="line-number">187</span><br><span class="line-number">188</span><br><span class="line-number">189</span><br><span class="line-number">190</span><br><span class="line-number">191</span><br><span class="line-number">192</span><br><span class="line-number">193</span><br><span class="line-number">194</span><br><span class="line-number">195</span><br><span class="line-number">196</span><br><span class="line-number">197</span><br><span class="line-number">198</span><br><span class="line-number">199</span><br><span class="line-number">200</span><br><span class="line-number">201</span><br><span class="line-number">202</span><br><span class="line-number">203</span><br><span class="line-number">204</span><br><span class="line-number">205</span><br><span class="line-number">206</span><br><span class="line-number">207</span><br><span class="line-number">208</span><br><span class="line-number">209</span><br><span class="line-number">210</span><br><span class="line-number">211</span><br><span class="line-number">212</span><br><span class="line-number">213</span><br><span class="line-number">214</span><br><span class="line-number">215</span><br><span class="line-number">216</span><br><span class="line-number">217</span><br><span class="line-number">218</span><br><span class="line-number">219</span><br><span class="line-number">220</span><br><span class="line-number">221</span><br><span class="line-number">222</span><br><span class="line-number">223</span><br><span class="line-number">224</span><br><span class="line-number">225</span><br><span class="line-number">226</span><br><span class="line-number">227</span><br><span class="line-number">228</span><br><span class="line-number">229</span><br><span class="line-number">230</span><br><span class="line-number">231</span><br><span class="line-number">232</span><br><span class="line-number">233</span><br><span class="line-number">234</span><br><span class="line-number">235</span><br><span class="line-number">236</span><br><span class="line-number">237</span><br><span class="line-number">238</span><br><span class="line-number">239</span><br><span class="line-number">240</span><br><span class="line-number">241</span><br><span class="line-number">242</span><br></div></div></div> <footer class="page-edit" style="display:none;"><!----> <div class="last-updated"><span class="prefix">Last Updated: </span> <span class="time">2020-8-27 10:24:30</span></div></footer> <!----> <!----> <!----></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-c6073ba8 data-v-c6073ba8><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-c6073ba8><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-c6073ba8></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-c6073ba8></path></svg></div><div class="kanbanniang" data-v-5775ee02><div class="banniang-container" style="display:;" data-v-5775ee02><div class="messageBox" style="right:68px;bottom:190px;display:none;" data-v-5775ee02>
      欢迎来到 LV's Blog
    </div> <div class="operation" style="right:90px;bottom:40px;display:none;" data-v-5775ee02><i class="kbnfont kbn-ban-home ban-home" data-v-5775ee02></i> <i class="kbnfont kbn-ban-message message" data-v-5775ee02></i> <i class="kbnfont kbn-ban-close close" data-v-5775ee02></i> <a target="_blank" href="https://vuepress-theme-reco.recoluan.com/views/plugins/kanbanniang.html" data-v-5775ee02><i class="kbnfont kbn-ban-info info" data-v-5775ee02></i></a> <i class="kbnfont kbn-ban-theme skin" style="display:none;" data-v-5775ee02></i></div> <canvas id="banniang" width="150" height="220" class="live2d" style="position:fixed;right:0px;bottom:0px;opacity:0.9;z-index:99999;" data-v-5775ee02></canvas></div> <div class="showBanNiang" style="display:none;" data-v-5775ee02>
    看板娘
  </div></div><div></div><!----><div class="vuepress-canvas-nest-element"></div><!----><APlayer audio="" fixed="true" theme="#b7daff" loop="loop" order="list" preload="auto" volume="0.7" mutex="true" lrc-type="0" list-max-height="250" storage-name="vuepress-plugin-meting" id="aplayer-fixed"></APlayer></div></div>
    <script src="/assets/js/app.7b81b1ac.js" defer></script><script src="/assets/js/4.86a5c9af.js" defer></script><script src="/assets/js/1.9c3b3d13.js" defer></script><script src="/assets/js/23.08e890b8.js" defer></script><script src="/assets/js/10.565245e4.js" defer></script>
  </body>
</html>
